package com.akkainaction.helloactor.become;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.helloactor.become.actor.SimpleActor;
import com.akkainaction.helloactor.become.po.Emp;

public class TestSimpleActor {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys");
        ActorRef simpleActorRef = system.actorOf(Props.create(SimpleActor.class), "simpleActor");
        simpleActorRef.tell("1", ActorRef.noSender());
        simpleActorRef.tell(new Emp("yiyi", 1000), ActorRef.noSender());
        simpleActorRef.tell(new Emp("erer", 2000), ActorRef.noSender());
//        simpleActorRef.tell("become3", ActorRef.noSender());
        simpleActorRef.tell("end", ActorRef.noSender());
        simpleActorRef.tell("2", ActorRef.noSender());
        simpleActorRef.tell(new Emp("sansan", 1000), ActorRef.noSender());
        simpleActorRef.tell(new Emp("sisi", 2000), ActorRef.noSender());
    }
}
